package com.aounhui.productor.service;

import com.aounhui.common.exceptions.SellCommodityException;
import com.aounhui.productor.entity.BaseProductor;
import com.aounhui.productor.entity.Commodity;
import com.aounhui.productor.entity.CommodityFactory;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author aounhui
 * @version 1.0
 * @date 2021/6/15 10:19
 */
public interface CommodityService {
    //生产产品
    void commodityCreater(CommodityFactory commodityFactory);
    //库存取货，消费者消费掉
    List<Commodity> getCommodity(String commodityName, int number, String orderId);
    //判断当前是不是满足库存数量
    boolean satisfyCommodity(String commodityName);
}
